Next | Prev | Up | Top | Contents | Index

Lock and Semaphore Types

The header files sys/sema.h and sys/types.h declare the data types of locks of different types, including the following:

lock_t Basic lock, or spin-lock, used with LOCK() and related functions
mutex_t Sleeping lock, used for mutual exclusion between upper-half instances.
sema_t Semaphore object, used for general locking.
mrlock_t Reader-writer locks, used with RW_RDLOCK() and related functions.
sv_t Synchronization variable, used with SV_WAIT and related functions

These lock types should be treated as opaque objects because their contents can change from release to release (and in fact their contents are different in IRIX 6.2 from previous releases).

The families of locking and synchronization functions contain functions for allocating, initializing, and freeing each type of lock. See "Waiting and Mutual Exclusion".


Next | Prev | Up | Top | Contents | Index